//
//  JXFeedBackConfigModel.m
//  JinXun
//
//  Created by Apple on 2023/2/21.
//

#import "JXFeedBackConfigModel.h"

@implementation JXFeedBackSelectItem

@end

@interface JXFeedBackConfigModel()

@property (nonatomic, strong) NSArray <JXFeedBackSelectItem *> *p_selectList;
@property (nonatomic, strong) NSArray <NSString *> *selectTitleList;

@end

@implementation JXFeedBackConfigModel

//MARK: - GET

- (NSArray<NSString *> *)selectTitleList
{
    if(!_selectTitleList){
        _selectTitleList = @[
        @"优化建议",
        @"功能bug",
        @"账号问题",
        @"4S店服务评价",
        @"其他问题",
        ];
    }
    return _selectTitleList;
}

- (NSArray<JXFeedBackSelectItem *> *)p_selectList
{
    if(!_p_selectList){
        NSMutableArray *arr = [@[] mutableCopy];
        [self.selectTitleList enumerateObjectsUsingBlock:^(NSString * _Nonnull obj, NSUInteger idx, BOOL * _Nonnull stop) {
            JXFeedBackSelectItem *item = [JXFeedBackSelectItem new];
            item.idx = idx;
            item.title = obj;
            item.select = NO;
            [arr addObject:item];
        }];
        
        JXFeedBackSelectItem *item = arr.firstObject;
        item.select = YES;
        
        _p_selectList = [arr copy];

    }
    return _p_selectList;
}

- (NSArray<JXFeedBackSelectItem *> *)selectList
{
    return self.p_selectList;
}

@end
